﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICeFramework.Common.DataLayer;

namespace ICeFramework.Business.DataLayer
{
    public class EntityRowError
    {
        private EntityColumn _column;
        public EntityColumn Column
        {
            get { return _column; }
        }

        private string _errorMessage;
        public string ErrorMessage
        {
            get { return _errorMessage; }
        }

        private string _errorCode;
        public string ErrorCode
        {
            get { return _errorCode; }
        }

        public EntityRowError(EntityColumn column, string errorCode, string errorMessage)
        {
            _column = column;
            _errorCode = errorCode;
            _errorMessage = errorMessage;
        }

        public EntityRowError(string errorCode, string errorMessage)
        {
            _errorCode = errorCode;
            _errorMessage = errorMessage;
        }

        public override string ToString()
        {
            return _errorMessage;
        }
    }
}
